<template>
    <div class="common">
        <commonUser ref="searchList">
            <div slot="member">
                <el-col :span="3">
                    <el-select @change="search('membershipType')" placeholder="按会员类型" size="small" v-model="memberType">
                        <el-option v-for="(item, index) in type" :key="index" :label="item.label" :value="item.value"></el-option>
                    </el-select>
                </el-col>
                <el-col :span="3">
                    <el-select @change="search('name')" placeholder="按等级" size="small" v-model="memberLevel">
                        <el-option v-for="(item, index) in level" :key="index" :label="item.label" :value="item.value"></el-option>
                    </el-select>
                </el-col>
            </div>
        </commonUser>
    </div>
</template>

<script>
    import { getCommonUserList, cancelPush } from "@/api/supermarket/user.js"
    import * as util from "@/util/util.js"
    export default {
        name: "memberList",
        components: {
            "commonUser": () => import("@/views/commonUser/commonUser")
        },
        methods: {
           search(type){
               console.log(this.$refs.searchList);
               this.$refs.searchList.search(type);
           }
        },
        data(){
            return {
                type: [
                    {label: "充值会员", value: 1},
                    {label: "消费会员", value: 2},
                ],
                level: [
                    {label: "v1会员", value: 5},
                    {label: "v2会员", value: 6},
                    {label: "v3会员", value: 7},
                ],
                memberType: "",
                memberLevel: "",
                noticeData: [],
                pageSize: 15,
                currentPage: 1,
                totalElements: 0,
                totalPages: 1,
                pushDialog: false,
                rowdata: {}
            }
        },
    }
</script>

<style lang="less" props>
.pushList {

}
</style>